﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ztn_iot_sdk_cSharp.req;
using ztn_iot_sdk_cSharp.res;

namespace ztn_iot_sdk_cSharp.tool
{
    class IotDeviceSensorTool
    {

        private  const string BASE_PATH = "iot/api/v1/v1/device/sensor/";

    public static List<DeviceSensorWith> list(DeviceSensorListWithReq req)
        {
            String path = BASE_PATH + "list";
            BaseRes<List<DeviceSensorWith>> res = HttpTool.doPost<BaseRes<List<DeviceSensorWith>>>(path, JsonTool.toJson(req));
            if (null != res && null != res.data)
            {
                return res.data;
            }
            return new List<DeviceSensorWith>();
        }

    }
}
